﻿namespace Microsoft.SharePoint.Client
{
    using System;
    using System.ComponentModel;

    [ScriptType("SP.ChangeFolder", ServerTypeId="{3b97573d-cee5-446a-853d-57ea0acf8aa4}")]
    public class ChangeFolder : Change
    {
        [EditorBrowsable(EditorBrowsableState.Never)]
        public ChangeFolder(ClientRuntimeContext Context, ObjectPath ObjectPath) : base(Context, ObjectPath)
        {
        }

        protected override bool InitOnePropertyFromJson(string peekedName, JsonReader reader)
        {
            bool flag = base.InitOnePropertyFromJson(peekedName, reader);
            if (!flag)
            {
                string str = peekedName;
                if (str == null)
                {
                    return flag;
                }
                if (!(str == "WebId"))
                {
                    if (str == "UniqueId")
                    {
                        flag = true;
                        reader.ReadName();
                        base.ObjectData.Properties["UniqueId"] = reader.ReadGuid();
                    }
                    return flag;
                }
                flag = true;
                reader.ReadName();
                base.ObjectData.Properties["WebId"] = reader.ReadGuid();
            }
            return flag;
        }

        [Remote]
        public Guid UniqueId
        {
            get
            {
                base.CheckUninitializedProperty("UniqueId");
                return (Guid) base.ObjectData.Properties["UniqueId"];
            }
        }

        [Remote]
        public Guid WebId
        {
            get
            {
                base.CheckUninitializedProperty("WebId");
                return (Guid) base.ObjectData.Properties["WebId"];
            }
        }
    }
}

